include("nwvar/nwvars.lua")
include("shared.lua")
include("commander/cl_init.lua")
include("class/cl_init.lua")
//include("scoreboard/cl_init.lua")
include("sh_team.lua")
include("armory/cl_init.lua")
include("resource/cl_init.lua")
include("cl_drawcircle.lua")

include("cl_debug.lua")

usermessage.Hook("Arc", function( um )

	local Id = um:ReadChar()
	
	if Id == 0 then
		
		local ply = ents.GetByIndex( um:ReadChar() )
		
		if IsValid( ply ) then
			hook.Call("PlayerSpawn", GAMEMODE, ply )
		end
		
	elseif Id == 1 then
		
		local ply = ents.GetByIndex( um:ReadChar() )
		
		if IsValid( ply ) then
			hook.Call("PlayerDeath", GAMEMODE, ply )
		end
		
	elseif Id == 2 then
		hook.Call("ShowSpare2", GAMEMODE )
	elseif Id == 3 then
		hook.Call("ShowSpare1", GAMEMODE )
	elseif Id == 4 then
		hook.Call("StartGame", GAMEMODE )
	end

end )